<%@ include file="/WEB-INF/pages/template/libs.jsp" %>
<c:if test="${listCartelera!=null}">
	<div class="grid">
		<table cellspacing="0">
			<thead>
				<tr>
					<th>&nbsp;</th>
					<th>Pelicula</th>
					<th>Tipo</th>
					<th>Publico</th>
					<th>Pais</th>
					<th>Cine</th>
					<th>Horarios</th>
					<th width="80px">&nbsp;</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="cartelera" items="${listCartelera}">
				<tr peliculaId="<c:out value="${cartelera.id.pelicula.id}" />" style="cursor: pointer;">
					<td><img src="resources/img/icon/<c:out value="${cartelera.id.pelicula.emision}" />.png" /> </td>
					<td><c:out value="${cartelera.id.pelicula.titulo}" /></td>
					<td>
					<c:if test="${ cartelera.id.pelicula.tipoPelicula == '1' }">Comedia</c:if>
					<c:if test="${ cartelera.id.pelicula.tipoPelicula == '2' }">Drama</c:if>
					<c:if test="${ cartelera.id.pelicula.tipoPelicula == '3' }">Romantica</c:if>
					<c:if test="${ cartelera.id.pelicula.tipoPelicula == '4' }">Accion</c:if>
					<c:if test="${ cartelera.id.pelicula.tipoPelicula == '5' }">Terror</c:if>
					</td>
					<td>
					<c:if test="${ cartelera.id.pelicula.publico == '1' }">Adulto</c:if>
					<c:if test="${ cartelera.id.pelicula.publico == '2' }">Infantil</c:if>
					<td><c:out value="${cartelera.id.pelicula.pais}" /></td>
					<td><c:out value="${cartelera.cine.nombre}" /></td>
					<td><c:out value="${cartelera.id.horario}" /></td>
					<td><ex:button color="white" align="center"
						onClick="selectedRow(this);">Detalle</ex:button></td>
				</tr>
				</c:forEach>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="5">
						<ex:pager total="${pages}" current="${lastpage}" onPaging="javascript:onPaging(%p);" />
					</td>
				</tr>
			</tfoot>
		</table>
	</div>
</c:if>
<c:if test="${msg!=null}">
	<div class="grid" style="width: 800px;">
		<table cellspacing="0"  >
			<tbody>
				<tr>
					<td style="padding: 5px;"><i>
					
					<c:if test="${msg=='nofound'}">
						<bean:message key="app.word.nofound"/>
					</c:if>
					
					</i></td>
				</tr>
			</tbody>
		</table>
	</div>
</c:if>